import {createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path:'/',
    name:'login',
    component:()=>import('../views/Login')
  },
  {
    path:'/answered',
    name:'answered',
    component:()=>import('../components/Answered')
  },

  {
    path:'/SelectGenre',
    name:'SelectGenre',
    component:()=>import('../views/SelectGenre')
  },
  {
    path:'/data',
    name:'data',
    component:()=>import('../components/Chart')
  },
  {
    path:'/answerLogin',
    name:'answerLogin',
    component:()=>import('../components/AnswerLogin')

  },
  {
    path:'/answerView',
    name:'answerView',
    component:()=>import('../components/AnswerView')
  },
  {
    path: '/regis',
    name: 'regis',
    component: () => import('../views/Register.vue')
  },
  {
    path: '/retrieval',
    name: 'retrieval',
    component: () => import('../views/Retrieval.vue')
  },
  {
    path: '/Changepass',
    name: 'Changepass',
    component: () => import('../views/ChangePass.vue')
  },
  {
    path: '/Admin',
    name: '/Admin',
    component : () => import('../components/Admin'),
    children: [

      {
        path: '/AdminTenantManage',
        name: 'AdminTenantManage',
        component: () => import('../components/AdminTenantManage.vue')
      },
      {
        path: '/LoginAuthorityManagement',
        name: 'LoginAuthorityManagement',
        component: () => import('../components/AdminLoginAuthorityMain.vue')
      }
    ]

  },
  {
    path: '/TenantIndex',
    name: 'TenantIndex',
    component: () => import('../components/TenantIndex'),
    children: [
      {
        path: '/Tenant-main',
        name: 'Tenant-main',
        component: () => import('../components/Tenant-main.vue')
      },

    ]
  },
  {
    path: '/Index',
    name: 'index',

    component: () => import('../components/Index'),
    children : [
      {
        path: '/Answer',
        name: 'answer',
        component : () => import('../components/Answer')
      },
      {
        path: '/GroupManage',
        name: 'groupManage',
        component : () => import('../components/GroupManage')
      },
      {
        path: '/Questionnaire',
        name: 'questionnaire',
        component : () => import('../components/Questionnaire')
      },
      {
        path: '/LookQuestionnaire',
        name: 'LookQuestionnaire',
        component : () => import('../views/LookQuestionnaire')
      },
      {
        path: '/AddQuestionnaire',
        name: 'AddQuestionnaire',
        component : () => import('../views/designQuestion')
      },
      {
        path: '/SetToQuestion',
        name: 'SetToQuestion',
        component : () => import('../components/SetToQuestion')
      },
      {
        path: '/Individu',
        name: 'Individu',
        component : () => import('../views/Individualization')
      },

    ]

  }

]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
